package com.zyg.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
@Data
@TableName("student_info")
public class Student {
    //编号
    @TableId(value = "s_id",type = IdType.AUTO)
    private int sid;
    //学号
    private String studentNum;
    //姓名
    private String studentName;
    //性别 0男 1女 2保密
    private String gender;
    //年龄
    private Integer age;
    //生日
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("date_of_birth")
    private Date birthday;

    @TableField(exist = false)
    private Class cla;
    //班级  外键
    @TableField("class_id")
    private Integer classId;

    @TableField(exist = false)
    private Hotel hotel;
    //宿舍号 外键
    @TableField("hotel_id")
    private Integer hotelId;
    //电话
    private String phone;
    //邮箱
    private String email;
    //家庭住址
    @TableField("home_address")
    private String homeAddress;
    //紧急联系人姓名
    private String emergencyContact;
    //紧急联系人电话
    private String emergencyContactPhone;

    @TableField(exist = false)
    private Major maj;
    //专业  外键
    @TableField("major")
    private Integer majorId;
    //学生状态 0在读 1毕业
    private String status;
    //删除标志 0存在 1删除
    @TableField("del_flag")
    private String deleteFlag;
    //创建者
    private String createBy;
    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    //更新者
    private String updateBy;
    //更新时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;
    //备注
    private String remark;

}
